import requests
requests.packages.urllib3.disable_warnings()
url = "https://testpassport.rabbitpre.com/api/sso/login"
params = {"account":"***********","password":"******","fromType":"pc"}

session = requests.session()
requests.packages.urllib3.disable_warnings()
response = session.post(url, json=params)
if response.json().get('code') == '200' and response.json().get("errorCode") == "SUCCESS":
     print('登录成功')
else:
    print('登录失败')

bws_url = "https://bws.test.rabbitpre.com/api/user"

resp = session.get(bws_url, verify=False)

# print(resp.text)
Userid = resp.json()["data"]["userId"]
orgID = resp.json()["data"]["userOrgInfo"]["orgId"]
print('企业的userID =',Userid)
print('企业的orgID  =',orgID)